package com.space.user.converter;

import com.space.user.database.dataobject.UserAccountDO;
import com.space.user.domain.account.entity.UserAccount;
import org.mapstruct.*;

/**
 * @author <a href="mailto:414563035@qq.com">Bedroom</a>
 * @date 2021/4/26 3:50 下午
 */
@Mapper(config = ShareMapperConfig.class)
public interface UserAccountConverter {
    @Mappings({
            @Mapping(source = "userId", target = "userId.userId"),
    })
    UserAccount toEntity(UserAccountDO userInfoDO);

    @InheritInverseConfiguration
    UserAccountDO toDO(UserAccount userInfoDO);
}
